<?php

header("Content-type:text/html;charset=utf-8");

$name=$_POST["name"];
$pass=$_POST["pass"];

$conn = mysql_connect("localhost","root","root");
	
mysql_select_db("zrt");

$result = mysql_query("select * from yonghu where yhname = '$name'and mima='$pass'",$conn);
	
	if(mysql_num_rows($result) == 1){
		while($rows=mysql_fetch_assoc($result)){
			echo $rows["Id"];
		}
		//在ajax中,php是通过echo语句返回responseText
		
	}else{
		echo 0;
	}
	
	mysql_close($conn);
	
?>